package com.jmp.base;

import com.jmp.base.dto.*;
import one.stand.model.ResultModel;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

public interface MessageApi {
    /**
     * 推送发起人或目标类型：0所有 1用户 2企业标签组  3企业 4关注列表
     */
    int TYPE_ALL = 0;
    int TYPE_USER = 1;
    int TYPE_LABELS_COMPANY = 2;
    int TYPE_COMPANY = 3;
    int TYPE_COLLECTION = 4;

    /**
     * 推送发起人或目标ID：0所有人 1系统
     */
    int DEFAULT_ID_ALL = 0;
    int DEFAULT_ID_SYS = 1;

    int FORM_ID_TYPE_USER = 1;
    int FORM_ID_TYPE_CRM = 2;

    /**
     * 消息类型:未读信息提醒
     */
    Integer MSG_UNREAD = 1;
    /**
     * 消息类型:直播预约
     */
    Integer MSG_LIVE_OPEN = 2;

    /**
     * 推送
     */
    @PostMapping("/message/save/push")
    ResultModel savePush(@RequestBody MessageSavePushRequest request);

    /**
     * 推送
     */
    @PostMapping("/message/push")
    ResultModel push(@RequestBody MessagePushRequest request);

    /**
     * 微信服务通知
     */
    @PostMapping("/message/wx/service")
    ResultModel wxService(@RequestBody MessageWxServiceRequest request);

    /**
     * 微信订阅消息
     */
    @PostMapping("/message/wx/subscribe")
    ResultModel wxSubscribe(@RequestBody MessageWxSubscribeDto request);

    /**
     * 微信FormId
     */
    @PostMapping("/message/wx/formid")
    ResultModel wxFormid(@RequestBody MessageWxFormidRequest request);
}
